{
  "properties" : { },
  "id" : "copy1724223888530d83273",
  "script" : null,
  "groupId" : "c0cf605f74e34bc6953194a869f4a6cd",
  "name" : "B3查询气象站历史天气情况",
  "createTime" : null,
  "updateTime" : 1733708451378,
  "lock" : null,
  "createBy" : "admin",
  "updateBy" : "admin",
  "path" : "/stationweatherhis",
  "method" : "GET",
  "parameters" : [ {
    "name" : "stationkey",
    "value" : "",
    "description" : "必须填写 站ID",
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  }, {
    "name" : "btime",
    "value" : "2024-11-16T13:00:00",
    "description" : "开始时间",
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "pass",
    "error" : null,
    "expression" : null,
    "children" : null
  }, {
    "name" : "etime",
    "value" : "2024-11-16T13:00:00",
    "description" : "结束时间",
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "pass",
    "error" : null,
    "expression" : null,
    "children" : null
  }, {
    "name" : "page",
    "value" : "1",
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  }, {
    "name" : "size",
    "value" : "20",
    "description" : null,
    "required" : false,
    "dataType" : "String",
    "type" : null,
    "defaultValue" : null,
    "validateType" : null,
    "error" : null,
    "expression" : null,
    "children" : null
  } ],
  "options" : [ ],
  "requestBody" : "",
  "headers" : [ ],
  "paths" : [ ],
  "responseBody" : "{\n    \"code\": 0,\n    \"message\": \"success\",\n    \"data\": {\n        \"total\": 38439,\n        \"list\": [\n            {\n                \"stationKey\": \"E0006\",\n                \"lat\": 44.0267,\n                \"lon\": 125.0781,\n                \"high\": 203,\n                \"city\": \"长春市\",\n                \"stationName\": \"农安韦家\",\n                \"cnty\": \"农安县\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 995,\n                \"pres_sea\": 1020,\n                \"temp\": 3.9,\n                \"temp_max\": 4.1,\n                \"temp_min\": 3.6,\n                \"humi\": 39,\n                \"humi_min\": 38,\n                \"prec\": 0,\n                \"win_10_dir\": 303,\n                \"win_10_vel\": 4.5,\n                \"win_inst_dir\": 304,\n                \"win_inst_vel\": 8.2,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220122\"\n            },\n            {\n                \"stationKey\": \"E0013\",\n                \"lat\": 43.9383,\n                \"lon\": 124.7133,\n                \"high\": 236,\n                \"city\": \"长春市\",\n                \"stationName\": \"公主岭朝阳山\",\n                \"cnty\": \"公主岭市\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 4.5,\n                \"temp_max\": 5.1,\n                \"temp_min\": 4,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 999999,\n                \"win_10_vel\": 999999,\n                \"win_inst_dir\": 999999,\n                \"win_inst_vel\": 999999,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220184\"\n            },\n            {\n                \"stationKey\": \"E0011\",\n                \"lat\": 43.8744,\n                \"lon\": 124.2939,\n                \"high\": 169,\n                \"city\": \"长春市\",\n                \"stationName\": \"公主岭毛城子\",\n                \"cnty\": \"公主岭市\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 4.1,\n                \"temp_max\": 4.5,\n                \"temp_min\": 3.8,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 999999,\n                \"win_10_vel\": 999999,\n                \"win_inst_dir\": 999999,\n                \"win_inst_vel\": 999999,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220184\"\n            },\n            {\n                \"stationKey\": \"50938\",\n                \"lat\": 45.0389,\n                \"lon\": 122.3222,\n                \"high\": 163.7,\n                \"city\": \"白城市\",\n                \"stationName\": \"通榆向海\",\n                \"cnty\": \"通榆县\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 1001.4,\n                \"pres_sea\": 1022,\n                \"temp\": 2.1,\n                \"temp_max\": 2.3,\n                \"temp_min\": 1.8,\n                \"humi\": 29,\n                \"humi_min\": 27,\n                \"prec\": 0,\n                \"win_10_dir\": 322,\n                \"win_10_vel\": 8.4,\n                \"win_inst_dir\": 321,\n                \"win_inst_vel\": 12,\n                \"snow\": 999999,\n                \"WEP_Now\": 999999,\n                \"code\": \"220822\"\n            },\n            {\n                \"stationKey\": \"E0003\",\n                \"lat\": 44.0306,\n                \"lon\": 124.6944,\n                \"high\": 202,\n                \"city\": \"长春市\",\n                \"stationName\": \"公主岭边岗\",\n                \"cnty\": \"公主岭市\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 4.5,\n                \"temp_max\": 5.1,\n                \"temp_min\": 4,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 999999,\n                \"win_10_vel\": 999999,\n                \"win_inst_dir\": 999999,\n                \"win_inst_vel\": 999999,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220184\"\n            },\n            {\n                \"stationKey\": \"54380\",\n                \"lat\": 41.6956,\n                \"lon\": 127.3786,\n                \"high\": 830.1,\n                \"city\": \"白山市\",\n                \"stationName\": \"临江聚宝\",\n                \"cnty\": \"临江市\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 917.2,\n                \"pres_sea\": 1015.4,\n                \"temp\": 5.6,\n                \"temp_max\": 7.8,\n                \"temp_min\": 5.6,\n                \"humi\": 100,\n                \"humi_min\": 100,\n                \"prec\": 0,\n                \"win_10_dir\": 347,\n                \"win_10_vel\": 4.1,\n                \"win_inst_dir\": 330,\n                \"win_inst_vel\": 9.2,\n                \"snow\": 999999,\n                \"WEP_Now\": 999999,\n                \"code\": \"220681\"\n            },\n            {\n                \"stationKey\": \"54051\",\n                \"lat\": 44.6767,\n                \"lon\": 124.3447,\n                \"high\": 166,\n                \"city\": \"松原市\",\n                \"stationName\": \"前郭乌兰塔拉\",\n                \"cnty\": \"前郭尔罗斯蒙古族自治县\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999.8,\n                \"pres_sea\": 1020.5,\n                \"temp\": 3.3,\n                \"temp_max\": 3.4,\n                \"temp_min\": 2.7,\n                \"humi\": 28,\n                \"humi_min\": 28,\n                \"prec\": 0,\n                \"win_10_dir\": 346,\n                \"win_10_vel\": 5.2,\n                \"win_inst_dir\": 353,\n                \"win_inst_vel\": 10.2,\n                \"snow\": 999999,\n                \"WEP_Now\": 999999,\n                \"code\": \"220721\"\n            },\n            {\n                \"stationKey\": \"54175\",\n                \"lat\": 43.4167,\n                \"lon\": 126.6167,\n                \"high\": 537,\n                \"city\": \"吉林市\",\n                \"stationName\": \"吉林北大壶\",\n                \"cnty\": \"永吉县\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 953.6,\n                \"pres_sea\": 1018.2,\n                \"temp\": 0.3,\n                \"temp_max\": 0.4,\n                \"temp_min\": 0.2,\n                \"humi\": 100,\n                \"humi_min\": 100,\n                \"prec\": 0.7,\n                \"win_10_dir\": 67,\n                \"win_10_vel\": 1.2,\n                \"win_inst_dir\": 294,\n                \"win_inst_vel\": 2.9,\n                \"snow\": 999999,\n                \"WEP_Now\": 0,\n                \"code\": \"220221\"\n            },\n            {\n                \"stationKey\": \"54382\",\n                \"lat\": 42.3819,\n                \"lon\": 128.0236,\n                \"high\": 758,\n                \"city\": \"延边朝鲜族自治州\",\n                \"stationName\": \"长白山北坡\",\n                \"cnty\": \"安图县\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 924.4,\n                \"pres_sea\": 1015.3,\n                \"temp\": 4.1,\n                \"temp_max\": 6.6,\n                \"temp_min\": 4.1,\n                \"humi\": 98,\n                \"humi_min\": 98,\n                \"prec\": 0,\n                \"win_10_dir\": 323,\n                \"win_10_vel\": 3.8,\n                \"win_inst_dir\": 338,\n                \"win_inst_vel\": 9.8,\n                \"snow\": 999999,\n                \"WEP_Now\": 999999,\n                \"code\": \"222426\"\n            },\n            {\n                \"stationKey\": \"E0002\",\n                \"lat\": 44.0356,\n                \"lon\": 124.5692,\n                \"high\": 229,\n                \"city\": \"长春市\",\n                \"stationName\": \"公主岭梁正甲\",\n                \"cnty\": \"公主岭市\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 992.4,\n                \"pres_sea\": 1020.6,\n                \"temp\": 3.9,\n                \"temp_max\": 4.1,\n                \"temp_min\": 3.1,\n                \"humi\": 34,\n                \"humi_min\": 33,\n                \"prec\": 0,\n                \"win_10_dir\": 1,\n                \"win_10_vel\": 7.5,\n                \"win_inst_dir\": 354,\n                \"win_inst_vel\": 11.8,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220184\"\n            },\n            {\n                \"stationKey\": \"E0001\",\n                \"lat\": 44.0133,\n                \"lon\": 124.4531,\n                \"high\": 215,\n                \"city\": \"长春市\",\n                \"stationName\": \"公主岭管家沟\",\n                \"cnty\": \"公主岭市\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 3.3,\n                \"temp_max\": 4.2,\n                \"temp_min\": 3.3,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 999999,\n                \"win_10_vel\": 999999,\n                \"win_inst_dir\": 999999,\n                \"win_inst_vel\": 999999,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220184\"\n            },\n            {\n                \"stationKey\": \"E0007\",\n                \"lat\": 44.0986,\n                \"lon\": 124.8586,\n                \"high\": 231,\n                \"city\": \"长春市\",\n                \"stationName\": \"农安三岗\",\n                \"cnty\": \"农安县\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 4.3,\n                \"temp_max\": 5.4,\n                \"temp_min\": 4.2,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 327,\n                \"win_10_vel\": 6.1,\n                \"win_inst_dir\": 323,\n                \"win_inst_vel\": 10.2,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220122\"\n            },\n            {\n                \"stationKey\": \"E0010\",\n                \"lat\": 44.0936,\n                \"lon\": 125.7875,\n                \"high\": 174,\n                \"city\": \"长春市\",\n                \"stationName\": \"九郊聂家\",\n                \"cnty\": \"九台区\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 4.2,\n                \"temp_max\": 4.5,\n                \"temp_min\": 3.8,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 999999,\n                \"win_10_vel\": 999999,\n                \"win_inst_dir\": 999999,\n                \"win_inst_vel\": 999999,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220113\"\n            },\n            {\n                \"stationKey\": \"E0008\",\n                \"lat\": 43.9967,\n                \"lon\": 125.4,\n                \"high\": 195,\n                \"city\": \"长春市\",\n                \"stationName\": \"高新北地理所\",\n                \"cnty\": \"市辖区\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 995.2,\n                \"pres_sea\": 1019.2,\n                \"temp\": 4.2,\n                \"temp_max\": 4.5,\n                \"temp_min\": 4.1,\n                \"humi\": 44,\n                \"humi_min\": 42,\n                \"prec\": 0,\n                \"win_10_dir\": 300,\n                \"win_10_vel\": 4.4,\n                \"win_inst_dir\": 304,\n                \"win_inst_vel\": 8.2,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220101\"\n            },\n            {\n                \"stationKey\": \"E0012\",\n                \"lat\": 43.9442,\n                \"lon\": 124.5878,\n                \"high\": 204.3,\n                \"city\": \"长春市\",\n                \"stationName\": \"公主岭永茂\",\n                \"cnty\": \"公主岭市\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 4.2,\n                \"temp_max\": 5.4,\n                \"temp_min\": 4.2,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 999999,\n                \"win_10_vel\": 999999,\n                \"win_inst_dir\": 999999,\n                \"win_inst_vel\": 999999,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220184\"\n            },\n            {\n                \"stationKey\": \"E0005\",\n                \"lat\": 44.0744,\n                \"lon\": 124.9822,\n                \"high\": 191,\n                \"city\": \"长春市\",\n                \"stationName\": \"农安新城\",\n                \"cnty\": \"农安县\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 5.5,\n                \"temp_max\": 5.5,\n                \"temp_min\": 4.4,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 327,\n                \"win_10_vel\": 7.2,\n                \"win_inst_dir\": 348,\n                \"win_inst_vel\": 11.3,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220122\"\n            },\n            {\n                \"stationKey\": \"E9590\",\n                \"lat\": 42.0528,\n                \"lon\": 126.6803,\n                \"high\": 626,\n                \"city\": \"白山市\",\n                \"stationName\": \"江源大阳岔\",\n                \"cnty\": \"江源区\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 3.8,\n                \"temp_max\": 4,\n                \"temp_min\": 3.6,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 344,\n                \"win_10_vel\": 1.3,\n                \"win_inst_dir\": 301,\n                \"win_inst_vel\": 4.1,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220605\"\n            },\n            {\n                \"stationKey\": \"E0009\",\n                \"lat\": 44.1053,\n                \"lon\": 125.7058,\n                \"high\": 207,\n                \"city\": \"长春市\",\n                \"stationName\": \"龙嘉阎家岗子\",\n                \"cnty\": \"九台区\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 999999,\n                \"pres_sea\": 999999,\n                \"temp\": 4,\n                \"temp_max\": 4,\n                \"temp_min\": 3.5,\n                \"humi\": 999999,\n                \"humi_min\": 999999,\n                \"prec\": 0,\n                \"win_10_dir\": 319,\n                \"win_10_vel\": 5.1,\n                \"win_inst_dir\": 329,\n                \"win_inst_vel\": 8.2,\n                \"snow\": 999998,\n                \"WEP_Now\": 999998,\n                \"code\": \"220113\"\n            },\n            {\n                \"stationKey\": \"54281\",\n                \"lat\": 42.8931,\n                \"lon\": 127.95,\n                \"high\": 561.8,\n                \"city\": \"延边朝鲜族自治州\",\n                \"stationName\": \"敦化大蒲柴河\",\n                \"cnty\": \"敦化市\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 948.4,\n                \"pres_sea\": 1016.7,\n                \"temp\": 3.4,\n                \"temp_max\": 4.1,\n                \"temp_min\": 3.4,\n                \"humi\": 100,\n                \"humi_min\": 100,\n                \"prec\": 0,\n                \"win_10_dir\": 299,\n                \"win_10_vel\": 3.9,\n                \"win_inst_dir\": 290,\n                \"win_inst_vel\": 9.2,\n                \"snow\": 999999,\n                \"WEP_Now\": 999999,\n                \"code\": \"222403\"\n            },\n            {\n                \"stationKey\": \"54178\",\n                \"lat\": 43.0294,\n                \"lon\": 126.4372,\n                \"high\": 350.1,\n                \"city\": \"吉林市\",\n                \"stationName\": \"磐石呼兰\",\n                \"cnty\": \"磐石市\",\n                \"timeBase\": \"2024-11-16T13:00:00\",\n                \"pres\": 976.1,\n                \"pres_sea\": 1019.1,\n                \"temp\": 3.1,\n                \"temp_max\": 3.4,\n                \"temp_min\": 2.9,\n                \"humi\": 99,\n                \"humi_min\": 99,\n                \"prec\": 0,\n                \"win_10_dir\": 261,\n                \"win_10_vel\": 4,\n                \"win_inst_dir\": 263,\n                \"win_inst_vel\": 5.8,\n                \"snow\": 999999,\n                \"WEP_Now\": 999999,\n                \"code\": \"220284\"\n            }\n        ]\n    },\n    \"timestamp\": 1733708441425,\n    \"executeTime\": 13961\n}",
  "description" : null,
  "requestBodyDefinition" : null,
  "responseBodyDefinition" : {
    "name" : "",
    "value" : "",
    "description" : "",
    "required" : false,
    "dataType" : "Object",
    "type" : null,
    "defaultValue" : null,
    "validateType" : "",
    "error" : "",
    "expression" : "",
    "children" : [ {
      "name" : "code",
      "value" : "1",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "message",
      "value" : "success",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "data",
      "value" : "Hello magic-api",
      "description" : "",
      "required" : false,
      "dataType" : "String",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "timestamp",
      "value" : "1723701688631",
      "description" : "",
      "required" : false,
      "dataType" : "Long",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    }, {
      "name" : "executeTime",
      "value" : "174",
      "description" : "",
      "required" : false,
      "dataType" : "Integer",
      "type" : null,
      "defaultValue" : null,
      "validateType" : "",
      "error" : "",
      "expression" : "",
      "children" : [ ]
    } ]
  }
}
================================
/**
 *   查询历史
 *  @param   stationkey  查询指定站点编码
 */
var sql = """
    select  * from stationdata_hour   
    where 1 = 1 
     <if test="stationkey != null and stationkey != ''" > and stationKey = #{stationkey} </if>
     <if test="btime != null and btime != ''\" > and DATE_FORMAT(#{btime}, '%Y-%m-%d %H:%i:%s') <= timeBase </if>
     <if test="etime != null and etime != ''\" > and DATE_FORMAT(#{etime}, '%Y-%m-%d %H:%i:%s') >= timeBase </if>
     order by timeBase  desc
"""

return db.page(sql);